package service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.CustomerDao;
import pojo.Customer;
import service.CustomerManager;
@Service(value="customerManager")
public class CustomerManagerImpl implements CustomerManager{
	
	@Resource(name="customerDao")
	private CustomerDao cd;
	@Override
	@Transactional
	public Customer register(Customer customer) {
		return cd.addCustomer(customer);
	}

	@Override
	public Customer login(String cname, String password) {
		return cd.findCustomerByCnameAndPassword(cname, password);
	}

}
